package org.aurora.core.biz.service.impl;

import org.aurora.core.biz.persistence.TaskMapper;
import org.aurora.core.biz.service.ITaskService;
import org.aurora.model.entity.Task;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TaskServiceImpl implements ITaskService {
    @Resource
    private TaskMapper taskMapper;

    @Override
    public Long saveTask(Task task) {
        taskMapper.addTask(task);
        return task.getId();
    }

    @Override
    public void updateTask(Task task) {
    }

    @Override
    public Task queryTask(Long taskId) {
        return taskMapper.getTask(taskId);
    }

    @Override
    public List<Task> queryTasksByAppcode(String appcode) {
        return this.taskMapper.queryTasksByAppcode(appcode);
    }

    @Override
    public void deleteTask(Long taskId) {

    }
}
